# 判断一个数字n是否是 质数
n = 1000
a = 2
flag =0

while a<n:
    if n%a==0:
        print(n,"不是质数")
        flag = 1
        break
    a+=1
if flag ==0:
    print(n,"是质数")

for i in range(2,n):
    if n%i==0:
        print(n,"不是质数")
        break
else:
    print(n,"是质数")